package com.huawei.csi.tool.util;

import com.google.gson.reflect.TypeToken;
import org.junit.jupiter.api.Test;

import java.util.List;
import java.util.Optional;

import static org.junit.jupiter.api.Assertions.*;

class FileUtilCJMainController {

    @Test
    void jsonFile2Class() {
        Optional<Object> optionalObject = FileUtil.jsonFile2Class("json/file.json", new TypeToken<List<String>>() {
        }.getType());
        optionalObject.ifPresent(o -> assertInstanceOf(List.class, o));
    }
}